<!DOCTYPE html>
<html>
    <head>
        <script src="js/vue.js"></script>
    </head>
    <body>
        <div id="app">
            <my-component id="test" name="123" class="class" style="font-size: large;"></my-component>
        </div>
        <script>
            Vue.component('my-component',{
                template:'<button @click="showAttrs">查看属性</button>',
                methods : {
                    showAttrs(){
                        console.log(this.$attrs);
                    }
                }
            });
            var vm = new Vue({el:'#app'});
        </script>
    </body>
</html>